<h3>Booking</h3>

<table class="data">
    <tr class="data">
        <th class="data" width="30px">No</th>
        <th class="data">Costumer</th>
        <th class="data">flight</th>
        <th class="data">from</th>
        <th class="data">to</th>
        <th class="data">Status</th>
        <th class="data" width="75px">Action</th>
    </tr>
    <?php foreach ($rows as $booking): ?>
        <tr class="data">
            <td class="data" width="30px"><?php echo $i ?></td>
            <td class="data"><?php echo get_user($booking->id_user) ?></td>
            <td class="data"><img src="<?php echo base_url() ?>image/icon_<?php echo strtolower($booking->airlines_name)?>_2.jpg"> <?php echo $booking->flight_number ?></td>
            <td class="data"><?php echo get_airport($booking->from)." ($booking->from)" ?></td>
            <td class="data"><?php echo get_airport($booking->to). " ($booking->to)" ?></td>
            <td class="data">
        <center>
            <?php echo get_status_color($booking->status); ?> &nbsp;&nbsp; 
        </center>    
    </td>
    <td class="data" width="75px">
    <center>
        <?php foreach ($access->result() as $a): ?>
            <a href="<?php echo base_url() ?>bookings/show/<?php echo $booking->id ?>"><img src="<?php echo base_url() ?>img/detail.png"></a>&nbsp;&nbsp;
            <?php echo get_delete($a->booking_m_delete, 'bookings/delete/', $booking->id) ?>&nbsp;&nbsp;
        <?php endforeach; ?>
    </center>
    <?php $i++ ?>
<?php endforeach ?>
</td>
</tr>

</table>
<p>
<?php echo $links; ?></p>
